package com.kgo.log.logtools.file.watch;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class FileListen {
    private static final Logger logger = LoggerFactory.getLogger(FileListen.class);
    @Autowired
    private LoggerMonitor loggerMonitor;
    @Async("taskExecutor")
    public void startListen(String path){
        logger.debug("Looking up " + path);
        loggerMonitor.loggerFile(path);
    }

}